package com.edu.entity.queryanswer;

import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class AnswerVo{
    private String username;
    private Integer id;
    private String answer;
    private Integer queryId;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date answerTime;
    private int likes;
    private Integer userId;

    public AnswerVo() {
        super();
    }

    @Override
    public String toString() {
        return "AnswerVo{" +
                "username='" + username + '\'' +
                ", id=" + id +
                ", answer='" + answer + '\'' +
                ", queryId=" + queryId +
                ", answerTime=" + answerTime +
                ", likes=" + likes +
                ", userId=" + userId +
                '}';
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getAnswer() {
        return answer;
    }

    public void setAnswer(String answer) {
        this.answer = answer;
    }

    public Integer getQueryId() {
        return queryId;
    }

    public void setQueryId(Integer queryId) {
        this.queryId = queryId;
    }

    public Date getAnswerTime() {
        return answerTime;
    }

    public void setAnswerTime(Date answerTime) {
        this.answerTime = answerTime;
    }

    public int getLikes() {
        return likes;
    }

    public void setLikes(int likes) {
        this.likes = likes;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public AnswerVo(String username, String answer, Integer queryId, Date answerTime, int likes, Integer userId) {
        this.username = username;
        this.answer = answer;
        this.queryId = queryId;
        this.answerTime = answerTime;
        this.likes = likes;
        this.userId = userId;
    }

    public AnswerVo(String username, Integer id, String answer, Integer queryId, Date answerTime, int likes, Integer userId) {
        this.username = username;
        this.id = id;
        this.answer = answer;
        this.queryId = queryId;
        this.answerTime = answerTime;
        this.likes = likes;
        this.userId = userId;
    }
}
